<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/static/layui/css/layui.css">
    <script src="/static/js/echarts.min.js"></script>
    <link rel="stylesheet" href="/static/font/iconfont.css">
    <title>阿斯利康数据分析平台</title>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header" style="background:#f6cce2 ">
        <div class="layui-logo">
            <img src="/static/img/ic_logo.png" style="height: 95%"></img>
        </div>
        <!-- 头部区域（可配合layui已有的水平导航） -->

        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;" style="color:black">
                    <img class="layui-nav-img">
                    {{username}}
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="javascript:;" onclick="changePwd()"> <i class="iconfont icon-xiugaimima"
                                                                         style="margin-right: 10px"></i>修改密码</a>
                    </dd>
                    <dd><a href="javascript:;" onclick="logout()"><i class="iconfont icon-tuichu"
                                                                     style="margin-right: 10px"></i>退出登录</a></dd>
                </dl>
            </li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black" style="background: #e9e9e9 !important;">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test" style="background: #e9e9e9 !important;">

                <li class="layui-nav-item layui-this"><a id="analysis" href="javascript:;"
                                                         target="http://139.219.230.137:8080/ASLK_BI/historyhotmapanalysis.html"><i
                        class="iconfont icon-baobiao"
                        style="margin-right: 20px"></i>历史热图</a>
                </li>
                <li class="layui-nav-item"><a href="javascript:;" target="/module_employ"><i
                        class="iconfont icon-shujubaobiao"
                        style="margin-right: 20px"></i>模块打开次数</a>
                </li>
                <li class="layui-nav-item"><a href="javascript:;" target="/poi_search_employ"><i
                        class="iconfont icon-shujubaobiao"
                        style="margin-right: 20px"></i>POI搜索次数</a>
                </li>
                <li class="layui-nav-item"><a href="javascript:;" target="/poi_navigation_employ"><i
                        class="iconfont icon-shujubaobiao"
                        style="margin-right: 20px"></i>POI导航次数</a>
                </li>
                <li class="layui-nav-item"><a id="monitor" href="javascript:;" target="http://139.219.230.137:8080/ASLK_BI/monitor.html"><i
                        class="iconfont icon-dibu_baobiao_morenxiaoguo" style="margin-right: 20px"></i>实时位置分布</a></li>
            </ul>
        </div>
    </div>

    <div class="layui-body" style="background: #f7f7f7;overflow: hidden;">
        <iframe id="iframe" src='' height="100%" width="100%" frameborder='no' border='0' marginwidth='0'
                marginheight='0' scrolling='yes' allowtransparency='yes'></iframe>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        © astrazeneca.com.cn - 阿斯利康中国
    </div>
</div>
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="/static/layui/layui.js"></script>
<script>
  var $;
  //JavaScript代码区域
  layui.use('element', function () {
    $ = layui.jquery;
    var ip_addr = document.location.hostname;

    var element = layui.element;
    $("#iframe").attr('src', "http://"+ip_addr+":8080/ASLK_BI/historyhotmapanalysis.html?x-az-token="
      + localStorage.azToken);
			 $("#analysis").attr("target","http://"+ip_addr+":8080/ASLK_BI/historyhotmapanalysis.html");
			  $("#monitor").attr("target","http://"+ip_addr+":8080/ASLK_BI/monitor.html");
    $(function () {
      $('.layui-nav-tree li').click(function () {
        var $this = $(this),
          _clickTab = $this.find('a').attr('target');
        $("#iframe").attr('src', _clickTab + "?x-az-token="
          + localStorage.azToken);
      });
    });
  });

  function changePwd() {
    $("#iframe").attr('src', "/admin/changepwd?x-az-token="
      + localStorage.azToken);
  }

  function logout() {
    localStorage.azToken = '';
    window.location.href = '/admin/login';
  }


</script>
</body>

</html>